<?php
namespace app\admin\model;

use think\Model;
use app\admin\model\AttachmentModel;

class WebsetModel extends Model
{
    // 确定链接表名
    protected $name = 'webset';

	public function getInfo(){
		$arr = [];
		$Attachment = new AttachmentModel();
		foreach($this->select() as $k => $v){
			if($v['type'] == '1'){
				$arr[$v['name']] = $Attachment->getAttachmentPath($v['values']);
			}else{
				$arr[$v['name']] = $v['values'];
			}
		}
		return $arr;
	}
}
